# 字典练习
company = {"BOSS":'唐僧',"CTO":'悟空',"CFO":'八戒',"搬砖":'沙僧',"苦力":'白龙马'}
print(company.get("CTO"))
print(company.get("BOSS"))
print("\n")

for i,j in company.items():
    print(i+"是"+j)
print("\n")

name = input("请输入西游记角色名：")
if name in company.values():
    print(f"{name}存在company中")
else:
    print(f"{name}不存在company中")


# 用户检测（无限次）
userlst = {'root':'123456','admin':'admin'}

while True:
        print('"欢迎使用用户检测系统"')
        username = input('请输入您的用户名:')
        passwd = input('请输入您的密码:')
        i = (username,passwd)

        if i in userlst.items():
            print('###############\n'
            '验证成功')
        else:
            print('###############\n'
                  '验证失败')

        choice = input("按quit进行退出，按任意键继续检测")
        if choice == 'quit':
            exit(0)